if(NOT KMPKG_TARGET_IS_WINDOWS)
    kmpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
set(KMPKG_POLICY_ALLOW_DEBUG_INCLUDE enabled)
set(KMPKG_POLICY_ALLOW_DEBUG_SHARE enabled)
kmpkg_from_gitee(
        OUT_SOURCE_PATH SOURCE_PATH
        REPO kumo-pub/jieba
        REF v${VERSION}
        SHA512 1023f31793b7e4f1b418f5b27db92213d085285ebadadb50b90c215775ebb4565559a770ab5a3e82aa15967986ab2f3df5d7834fe344d72f4056f6e24e7ccf5c
        HEAD_REF master
)

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    DISABLE_PARALLEL_CONFIGURE
    OPTIONS
        -DKMCMAKE_BUILD_TEST=OFF
)



kmpkg_cmake_install()
kmpkg_cmake_config_fixup(PACKAGE_NAME jieba CONFIG_PATH lib/cmake/jieba)
kmpkg_fixup_pkgconfig()

kmpkg_copy_pdbs()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
kmpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
